package com.kx.strategy_mode;

/**
 * Created on 2021/10/14.
 *
 * @author KaiXuan Xiao
 */
///////////////////////////////////////////////////////////////////////////
// 打折收费
///////////////////////////////////////////////////////////////////////////
public class CashRebate extends CashSuper {

    // 打几折
    private double moneyRebate = 1d;

    public CashRebate(String moneyRebate){
        this.moneyRebate = Double.parseDouble(moneyRebate);
    }

    @Override
    public double acceptCash(double money) {
        return this.moneyRebate * money;
    }
}
